part of '../index.dart';

class NoticeModel {
  int? id;
  String? targetId;
  String? fromImId;
  String? msg;
  int? msgType;
  String? title;
  String? action;
  String? createTime;
  int? readFlag;
  String? page;
  String? pic;
  int? pushMsgId;
  int? appType;

  NoticeModel({
    this.id,
    this.targetId,
    this.fromImId,
    this.msg,
    this.msgType,
    this.title,
    this.action,
    this.createTime,
    this.readFlag,
    this.page,
    this.pic,
    this.pushMsgId,
    this.appType,
  });

  NoticeModel.fromJson(Map<String, dynamic> json) {
    id = int.tryParse('${json['id']}');
    targetId = json['targetId'];
    fromImId = json['fromImId'];
    msg = json['msg'];
    msgType = int.tryParse('${json['msgType']}');
    title = json['title'];
    action = json['action'];
    createTime = json['createTime'];
    readFlag = int.tryParse('${json['readFlag']}');
    page = json['page'];
    pic = json['pic'];
    pushMsgId = int.tryParse('${json['pushMsgId']}');
    appType = int.tryParse('${json['appType']}');
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['id'] = id;
    data['targetId'] = targetId;
    data['fromImId'] = fromImId;
    data['msg'] = msg;
    data['msgType'] = msgType;
    data['title'] = title;
    data['action'] = action;
    data['createTime'] = createTime;
    data['readFlag'] = readFlag;
    data['page'] = page;
    data['pic'] = pic;
    data['pushMsgId'] = pushMsgId;
    data['appType'] = appType;
    return data;
  }
}
